<?php

class ui_datatable_row extends ui
{
	function __construct($row)
	{
		$this->init(__FILE__,'tr',array('class'=>'datatable_row',));
		$this->row = $row;
	}
	
	function pre_render($data=null)
	{
		global $ti;
		$this->set('id',$this->parent->name.'_'.$this->row);
		parent::pre_render($data);
		if($this->parent->result->next())
		{
			$this->data = $this->parent->result->data;
		}
		else
		{
			$this->set('style','display','none');
		}
		$this->set('class','datatable_row'.$this->parent->result->style,true);
	}
}

?>